package com.guigu.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.guigu.mapper.GatherDetailsMapper;
import com.guigu.pojo.GatherDetails;
import com.guigu.service.GatherDetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 入库单明细表 服务实现类
 * </p>
 *
 * @author Mr.Zhang
 * @since 2025-03-12
 */
@Service
public class GatherDetailsServiceImpl extends ServiceImpl<GatherDetailsMapper, GatherDetails> implements GatherDetailsService {

    @Autowired
    private GatherDetailsMapper gatherDetailsMapper;
    @Override
    public List<GatherDetails> getGatherDetails(Integer gatherid) {
        List<GatherDetails> gatherDetails = gatherDetailsMapper.getGatherDetails(gatherid);
        System.out.println(gatherDetails);
        return gatherDetails;
    }

    @Override
    public List<GatherDetails> getGatherDetails2(Integer gatherid) {
        QueryWrapper<GatherDetails> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("gather_id",gatherid);
        List<GatherDetails> gatherDetails = gatherDetailsMapper.selectList(queryWrapper);
        System.out.println(gatherDetails);
        return gatherDetails;
    }
}
